package cn.sciento.onelink.sim.aggregative.changeable.sim.date;

import cn.sciento.onelink.AppManager;
import cn.sciento.onelink.CommonResponse;
import cn.sciento.onelink.LinkRequest;
import cn.sciento.onelink.utils.TransIdUtil;
import lombok.Data;
import org.apache.http.client.methods.HttpRequestBase;

import java.util.HashMap;
import java.util.Map;

/**
 * 指定日期状态变更卡号信息查询
 * @author waltonlee
 */
@Data
public class SimChangeableDateRequest extends LinkRequest<CommonResponse<SimChangeableDateResult>> {
    public static final String PAGESIZE = "10";
    public static final String STARTNUM = "1";
    private String changeDate;
    private String cardStatus;
    private String pageSize;
    private String startNum;

    public SimChangeableDateRequest(String changeDate, String cardStatus,String pageSize,String startNum) {
        super(Method.GET);
        this.changeDate = changeDate;
        this.cardStatus = cardStatus;
        this.pageSize = pageSize;
        this.startNum = startNum;
    }
    public SimChangeableDateRequest(String changeDate, String cardStatus){
        this(changeDate,cardStatus,PAGESIZE,STARTNUM);
    }
    public HttpRequestBase generate() {
        this.path = "/ec/query/changeable-sim-date";
        HashMap<String, Object> bodyMap = new HashMap<String, Object>();
        bodyMap.put("transid", TransIdUtil.generate(AppManager.appId));
        bodyMap.put("token", this.getToken());
        bodyMap.put("changeDate",changeDate);
        bodyMap.put("cardStatus",cardStatus);
        bodyMap.put("pageSize",pageSize);
        bodyMap.put("startNum",startNum);
        this.setCompleteUrl(this.path, bodyMap);
        return httpRequestBase;
    }
}
